<?php

namespace app\common\validate\Business;

// 引入tp的验证器
use think\Validate;

// 客户验证器
class Business extends Validate
{
    // 验证规则
    protected $rule = [
        'mobile' => ['require', 'regex:/^1[3456789]{1}\d{9}$/', 'unique:business'],
        'password' => ['require'],
        'salt' => ['require'],
        // 'invitecode' => ['require']

    ];

    // 错误提示信息
    protected $message = [
        'mobile.require' => '手机号必填',
        'mobile.regex' => '手机号格式错误',
        'mobile.unique' => '手机号已注册',
        'password.require' => '密码必填',
        'salt.require' => '密码盐未知',
        // 'invitecode.require' => '邀请码未知'
    ];

    // 验证场景
    protected $scene = [];
}
